Update action muxer hierarchy propertly
authorMatthias Clasen <mclasen@redhat.com>
Mon, 1 Jun 2020 17:49:26 +0000 (13:49 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 Jun 2020 17:52:42 +0000 (13:52 -0400)
When a new muxer appears, we must not only make it
inherit from the parent, we also have to update all
children to inherit from it.

gtk/gtkwidget.c

index 18a6b048fae528fb5d4c78c69bea82ec1c23022c..73f223ecd4fd4de73dc05c72ed4593bb79efea63 100644 (file)
@@ -10718,6 +10718,7 @@ void
 _gtk_widget_update_parent_muxer (GtkWidget *widget)
 {
   GtkActionMuxer *muxer;
+  GtkWidget *child;
 
   muxer = (GtkActionMuxer*)g_object_get_qdata (G_OBJECT (widget), quark_action_muxer);
   if (muxer == NULL)
@@ -10725,6 +10726,10 @@ _gtk_widget_update_parent_muxer (GtkWidget *widget)
 
   gtk_action_muxer_set_parent (muxer,
                                gtk_widget_get_parent_muxer (widget, FALSE));
+  for (child = gtk_widget_get_first_child (widget);
+       child != NULL;
+       child = gtk_widget_get_next_sibling (child))
+    _gtk_widget_update_parent_muxer (child);
 }
 
 GtkActionMuxer *